package com.youxue.service;

import com.youxue.dao.UserFabulousMapper;
import com.youxue.entity.UserFabulous;
import com.youxue.entity.UserFabulousKey;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by 15c on 2018/2/10.
 */
@Service("UserFabulous")
public class UserFabulousServiceImpl implements UserFabulousService{

    @Autowired
    UserFabulousMapper userFabulousMapper;
    @Override
    public UserFabulous show(UserFabulousKey userFabulousKey) {
        return userFabulousMapper.selectByPrimaryKey(userFabulousKey);
    }

    @Override
    public int add(UserFabulous userFabulous) {
        return userFabulousMapper.insertSelective(userFabulous);
    }

    @Override
    public List<UserFabulous> showAUserAllFabulous(Integer userId) {
        return userFabulousMapper.selectAUserAllFabulous(userId);
    }
}
